﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PluginInterfacesLib;
using System.Windows.Forms;
using System.Drawing;
using System.IO;


namespace TestPlugin
{
    public class PluginTest : IPlugin
    {
        private String name;
        private IPluginHost host;
        private List<Button> buttons;
        public String Name { get { return this.name; } }
        public IPluginHost Host { get { return this.host; } set { this.host = value; } }

        public PluginTest()
        {
            this.name = "TestPlugin";
        }

        public void Initialize() 
        { 
        
        }

        public Bitmap GetPluginImage()
        {
            Stream s = this.GetType().Assembly.GetManifestResourceStream("TestPlugin.2.jpg");
            return new Bitmap(s);
        }
        public void Initialize(IPluginHost Host)
        {

            this.host = Host;
            this.buttons = new List<Button>();
            Button tmpBtn = new Button();
            tmpBtn.Name = this.name + " Test Button ";
            //tmpBtn.Click += new EventHandler(buttonClick);
            this.buttons.Add(tmpBtn);
            //this.host.AddButton("newBtn", "A New Button", 50, 50, newBtn_Click);
            Bitmap image = (Bitmap)this.host.GetWebcamImage();
        }

        public void StartPlugin()
        {

        }

        public void StopPlugin()
        {

        }

        public void Dispose()
        {

        }      
    }
}
